// --------------------------------------------------------------------------------------------------------------------
// <copyright file="WorkException.cs" company="AzureContrib (Open source library http://azurecontrib.codeplex.com)">
//   Microsoft Public License (Ms-PL)
// </copyright>
// <summary>
//   Exception only thrown by implementations of <see cref="IWorkItem" />
// </summary>
// --------------------------------------------------------------------------------------------------------------------

using System;
using System.Runtime.Serialization;

namespace AzureContrib.WindowsAzure.WorkServices
{
	/// <summary>
	/// Exception only thrown by implementations of <see cref="IWorkItem"/>
	/// </summary>
	[Serializable]
	public class WorkException : Exception
	{
		/// <summary>
		/// Initializes a new instance of the <see cref="WorkException"/> class. 
		/// </summary>
		public WorkException()
		{			
		}

		/// <summary>
		/// Initializes a new instance of the <see cref="WorkException"/> class. 
		/// <see cref="Exception"/>
		/// </summary>
		/// <param name="message">
		/// The message.
		/// </param>
		public WorkException(string message) : base(message)
		{			
		}

		/// <summary>
		/// Initializes a new instance of the <see cref="WorkException"/> class. 
		/// <see cref="Exception"/>
		/// </summary>
		/// <param name="message">
		/// The message.
		/// </param>
		/// <param name="innerException">
		/// The inner Exception.
		/// </param>
		public WorkException(string message, Exception innerException) : base(message, innerException)
		{			
		}

		/// <summary>
		/// Initializes a new instance of the <see cref="WorkException"/> class. 
		/// </summary>
		/// <param name="serializationInfo">The serialization info for the current serialization.</param>
		/// <param name="streamingContext">The context for the current serialization.</param>
		protected WorkException(SerializationInfo serializationInfo, StreamingContext streamingContext)
			: base(serializationInfo, streamingContext)
		{
		}
}
}